package com.example.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 用户信息 实体类。
 *
 * @author Administrator
 * @since 2023-10-16
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "用户信息")
@Table(value = "user_info")
public class UserInfo implements Serializable {

    /**
     * 主键id
     */
    @Id
    @Schema(description = "主键id")
    private Long id;

    /**
     * 编号
     */
    @Schema(description = "编号")
    private String userNo;

    /**
     * 用户名
     */
    @Schema(description = "用户名")
    private String name;

    /**
     * 密码
     */
    @Schema(description = "密码")
    private String password;

    /**
     * 年龄
     */
    @Schema(description = "年龄")
    private Integer age;

    /**
     * 创建日期
     */
    @Schema(description = "创建日期")
    @Column(onInsertValue = "now()")
    private Timestamp createTime;

    /**
     * 更新日期
     */
    @Schema(description = "更新日期")
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private Timestamp updateTime;

    /**
     * 逻辑删除
     */
    @Column(isLogicDelete = true)
    @Schema(description = "逻辑删除")
    private Integer isDeleted;

}
